package com.whu.MenuHub.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whu.MenuHub.domain.FoodDTO;
import com.whu.MenuHub.domain.Order;
import com.whu.MenuHub.domain.OrderDTO;
import com.whu.MenuHub.exception.MenuHubException;

import java.util.List;
import java.util.Map;

public interface OrderService  extends IService<Order> {

//    public IPage<OrderDTO> getOrderByUserID(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    public OrderDTO getOrderDetailByOrderID(Integer id);
    public IPage<Order> getOrders(Map<String, Object> condition, Integer pageNum, Integer pageSize);
    public void updateOrderByID(Order order) throws MenuHubException;
    public void deleteOrderbyOrderID(Integer id) throws MenuHubException;
    public Order insertOrder(OrderDTO orderDTO) throws MenuHubException;

    public void updateOrderComment(OrderDTO orderDTO)throws MenuHubException;
    Float getPriceByTime(int dayNum);
    Integer getOrderNumByTime(int dayNum);
}
